# Maintainer: Lukas Fleischer <lfleischer@archlinux.org>
# Maintainer: Robin Candau <antiz@archlinux.org>
# Contributor: Geoffrey Teale <tealeg@stop-squark>
# Contributor: Mark, Huo Mian <markhuomian[at]gmail[dot]com>
# Contributor: Biginoz <biginoz a free dot fr>
# Contributor: Mattias Andrée <`base64 -d`(bWFhbmRyZWUK)@member.fsf.org>

pkgname=redshift
pkgver=1.12
pkgrel=8
pkgdesc='Adjusts the color temperature of your screen according to your surroundings.'
arch=('loong64' 'x86_64')
url='http://jonls.dk/redshift/'
license=('GPL3')
depends=('libdrm' 'libxcb' 'libxxf86vm')
optdepends=('python-gobject: for redshift-gtk'
            'python-xdg: for redshift-gtk'
            'gtk3: for redshift-gtk'
            'geoclue: for automatic location based on GeoClue2') 
makedepends=('intltool' 'python')
source=("https://github.com/jonls/${pkgname}/releases/download/v${pkgver}/${pkgname}-${pkgver}.tar.xz")
md5sums=('5d04f2413dacdf3434cb86f373842462')
sha256sums=('d2f8c5300e3ce2a84fe6584d2f1483aa9eadc668ab1951b2c2b8a03ece3a22ba')

build() {
  cd "${srcdir}/${pkgname}-${pkgver}"

  ./configure --prefix=/usr --enable-drm --enable-randr --enable-vidmode --enable-geoclue2 \
    --with-systemduserunitdir=/usr/lib/systemd/user
  make
}

package() {
  cd "${srcdir}/${pkgname}-${pkgver}"
  make DESTDIR="${pkgdir}" install
}
